package com.ruoyi.company_Management.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.company_Management.mapper.QualificationMapper;
import com.ruoyi.company_Management.domain.Qualification;
import com.ruoyi.company_Management.service.IQualificationService;

/**
 * 企业资质Service业务层处理
 * 
 * @author why
 * @date 2025-04-26
 */
@Service
public class QualificationServiceImpl implements IQualificationService 
{
    @Autowired
    private QualificationMapper qualificationMapper;

    /**
     * 查询企业资质
     * 
     * @param id 企业资质主键
     * @return 企业资质
     */
    @Override
    public Qualification selectQualificationById(Long id)
    {
        return qualificationMapper.selectQualificationById(id);
    }

    /**
     * 查询企业资质列表
     * 
     * @param qualification 企业资质
     * @return 企业资质
     */
    @Override
    public List<Qualification> selectQualificationList(Qualification qualification)
    {
        return qualificationMapper.selectQualificationList(qualification);
    }

    /**
     * 新增企业资质
     * 
     * @param qualification 企业资质
     * @return 结果
     */
    @Override
    public int insertQualification(Qualification qualification)
    {
        qualification.setCreateTime(DateUtils.getNowDate());
        return qualificationMapper.insertQualification(qualification);
    }

    /**
     * 修改企业资质
     * 
     * @param qualification 企业资质
     * @return 结果
     */
    @Override
    public int updateQualification(Qualification qualification)
    {
        qualification.setUpdateTime(DateUtils.getNowDate());
        return qualificationMapper.updateQualification(qualification);
    }

    /**
     * 批量删除企业资质
     * 
     * @param ids 需要删除的企业资质主键
     * @return 结果
     */
    @Override
    public int deleteQualificationByIds(Long[] ids)
    {
        return qualificationMapper.deleteQualificationByIds(ids);
    }

    /**
     * 删除企业资质信息
     * 
     * @param id 企业资质主键
     * @return 结果
     */
    @Override
    public int deleteQualificationById(Long id)
    {
        return qualificationMapper.deleteQualificationById(id);
    }
}
